import EventMgr from "../../../Core/Event/EventMgr";
import TimerMgr from "../../../Core/Timer/TimerMgr";
import ConfigManager from "../../Config/ConfigManager";
import { GameItem } from "../../Config/schema/schema";
import ProtoBufManager from "../../proto/ProtoBufManager";
import { game } from "../../proto/protoCmd";
import { AbstractModel } from "../socket/AbstractModel";
import { GameModels } from "../socket/GameModels";
import { SocketManager } from "../socket/SocketManager";
import { ItemVO } from "../vo/ItemVO";
import { ModelPlayerInfo } from "./ModelPlayerInfo";

export class ModelBag extends AbstractModel {
    private _skillItem: ItemVO[];
    public get skillItem(): ItemVO[] {
        if (this._skillItem) {
            return this._skillItem;
        }
        this._skillItem = [];
        for (let i = 0; i < ConfigManager.tables.TbGameItem.getDataList().length; i++) {
            const cfg = ConfigManager.tables.TbGameItem.getDataList()[i];
            if (cfg.type1 == 2) {
                this._skillItem.push(new ItemVO(cfg));
            }
        }
        return this._skillItem;
    }
    protected registerInterestedProtocols(): void {
    }
}